package com.yangyouli.unity_demo_server.entity;

import java.util.Comparator;

public class FriendsVO {
	private int friendsId;
	private String nickname;
	private String headImgName;
	private int level;
	private boolean login;
	/**
	 * 根据等级降序排序的 Comparator 对象
	 */
	public static final Comparator<FriendsVO> DESC_SORT_BY_LEVEL_COMPARATOR = new Comparator<FriendsVO>() {
		@Override
		public int compare(FriendsVO o1, FriendsVO o2) {
			if (o1.level > o2.level) {
				return -1;
			} else if (o1.level < o2.level) {
				return 1;
			} else {
				return 0;
			}
		}
	};

	public int getFriendsId() {
		return friendsId;
	}

	public void setFriendsId(int friendsId) {
		this.friendsId = friendsId;
	}

	public String getNickname() {
		return nickname;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	public String getHeadImgName() {
		return headImgName;
	}

	public void setHeadImgName(String headImgName) {
		this.headImgName = headImgName;
	}

	public int getLevel() {
		return level;
	}

	public void setLevel(int level) {
		this.level = level;
	}

	public boolean isLogin() {
		return login;
	}

	public void setLogin(boolean login) {
		this.login = login;
	}

	@Override
	public String toString() {
		return "FriendsVO [friendsId=" + friendsId + ", nickname=" + nickname + ", headImgName=" + headImgName
				+ ", level=" + level + ", login=" + login + "]";
	}
}
